import { RouteRecordRaw } from 'vue-router';

// 获取模块的路由
export default function autoLoadModuleRoutes() {
  const modules = import.meta.globEager('../module/**/*.ts');
  
  const routes = [] as RouteRecordRaw[];

  Object.keys(modules).forEach(key => {
    routes.push(modules[key].default);
  });

  return routes;
}
